package com.slkj.shilixiaoyuanapp.net.service;

import com.slkj.shilixiaoyuanapp.entity.MainShowUiEntity;
import com.slkj.shilixiaoyuanapp.entity.MessageListEntity;
import com.slkj.shilixiaoyuanapp.entity.MessageNoticeListEntity;
import com.slkj.shilixiaoyuanapp.entity.NoticeNumEntity;
import com.slkj.shilixiaoyuanapp.entity.contacts.ContactsBackEntity;
import com.slkj.shilixiaoyuanapp.entity.contacts.MailListEntity;
import com.slkj.shilixiaoyuanapp.net.CommonResult;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;


//首页相关接口
public interface MainPageService {

    /**
     * 获取展示信息
     * @return
     */
    @GET("information/get.do")
    Observable<CommonResult<MainShowUiEntity>> getShowData();


    /**
     * 获取通讯录列表
     * @return
     */
    @GET("user/getUsers.do")
    Observable<CommonResult<MailListEntity>> getMailList();

    /**
     * 获取通讯录列表
     * @return
     */
    @GET("user/getUsers.do")
    Observable<CommonResult<ContactsBackEntity>> getContacts();

    /**
     * 消息 通知-消息列表
     * @return
     */
    @FormUrlEncoded
    @POST("notice/getMessageList.do")
    Observable<CommonResult<List<MessageListEntity>>> getNoticeList(@Field("page") int page, @Field("count") int count);



    /**
     * 获取通知未读数目
     * @return
     */
    @GET("notice/getNum.do")
    Observable<CommonResult<NoticeNumEntity>> getNoticeNum();



    /**
     * 消息 通知-消息列表
     * @return
     */
    @FormUrlEncoded
    @POST("notice/getHistry.do")
    Observable<CommonResult<MessageNoticeListEntity>> getNoticeList(@Field("type") int type, @Field("page") int page, @Field("count") int count);


}
